I how to get: how many data length will flush buffer ? by IRP_MJ_FLUSH_BUFFERS

I how to get: how many data length will flush buffer ? by IRP_MJ_FLUSH_BUFFERS

>>I how to get: how many data length will flush buffer ? by

>IRP_MJ_FLUSH_BUFFERS

It is impossible to know how many dirty pages will be flushed. Flushing code
usually calls CcFlushCache and it is hard to predict how many pages will be
flushed. Physical page frame state( from -dirty to clean- and -clean to
dirty- ) changes asynchronously. The number of flushed data is returned in
Information field of IoStatusBlock passed to CcFlushCache ( I wouldn’t bet
on its accuracy especially when there are user mapped files ), usually FSD
doesn’t copy this value in a user’s IoStatusBlock.


Slava Imameyev, xxxxx@hotmail.com

<pliceman_110> wrote in message news:xxxxx@ntfsd…
>I how to get: how many data length will flush buffer ? by
>IRP_MJ_FLUSH_BUFFERS
>
>
></pliceman_110>

thank Slava Imameyev

but i find this info from reactos code , CcFlushCache can get flushed data’s length by fileobject .

code:

fileobject->SectionObjectPointers->SharedCacheMap->bcb->FileSize

this FileSize maybe is flushed data’s length

> but i find this info from reactos code , CcFlushCache can get flushed

data’s length by fileobject .
code:
fileobject->SectionObjectPointers->SharedCacheMap->bcb->FileSize

In Windows CcFlushCache propogates dirty bit to PFNs and calls
MmFlushSection. The number of flushed pages depends from the number of
resident dirty pages and determined by Memory Manager.


Slava Imameyev, xxxxx@hotmail.com

<pliceman_110> wrote in message news:xxxxx@ntfsd…
> thank Slava Imameyev
>
> but i find this info from reactos code , CcFlushCache can get flushed
> data’s length by fileobject .
>
> code:
>
> fileobject->SectionObjectPointers->SharedCacheMap->bcb->FileSize
>
> this FileSize maybe is flushed data’s length
>
></pliceman_110>